package edu.androidecs.condescendingquiz;

import android.util.Log;

public class Question
{
	public static final int ANSWER_CHOICE_NUMBER=4;
	public String questionText;
	public String answerChoiceArray[];
	public String questionCategory;
	public int correctAnswer;
	public int questionLevel;
	public String insultText;
	
	public boolean wasCorrect; 
	
	public Question(QuestionLoadObject input)
	{
		answerChoiceArray=new String[4];
		
		answerChoiceArray[0]=input.answerChoice1;
		answerChoiceArray[1]=input.answerChoice2;
		answerChoiceArray[2]=input.answerChoice3;
		answerChoiceArray[3]=input.answerChoice4;
		
		questionText=input.questionText;
		questionCategory=input.questionCategory;
		correctAnswer=input.correctAnswerChoice;
		questionLevel=input.questionLevel;
		
		insultText=input.insultText;
		
		Log.i("CondescendingQuiz", "Created new question object: "+this.toString());
	}
	
	public String toString()
	{
		String outputString="";
		int val;
		
		outputString+=questionText+" "+questionCategory;
		
		for(val=0;val<ANSWER_CHOICE_NUMBER;val++)
		{
			outputString+=answerChoiceArray[val]+", ";
		}
		
		return outputString;
	}
}
